﻿package engine {
	
	import otherparts.Hose;
	import types.BlockType;
	import types.EngineType;
	import otherparts.Battery;
	import otherparts.FuelTank;
	
	/**
	$(CBI)* ...
	$(CBI)* @author Sentinel
	$(CBI)*/
	public class Engine {
		
		private var _type:int;
		private var _fuelTank:FuelTank;
		private var _battery:Battery;
		private var _starter:Starter;
		private var _block:Block;
		
		private var _oil:Oil;
		private var _oilPump:OilPump;
		
		public var fuelSource:FuelPump;
		private var _fuelInjectors:Vector.<FuelInjector>;
		private var _fuelPump:FuelPump;
		
		private var _sparkPlugs:Vector.<SparkPlug>;
		private var _turbos:Vector.<Turbo>;
		private var _superChargers:Vector.<SuperCharger>;
		private var _valves:Vector.<Valve>;
		private var _cooling:Cooling;
		private var _rev:int;
		private var _redLine:int;
		private var _revLimit:int;
		private var _isWorking:Boolean;
		
		
		
		public function Engine(){
			
			_block = new Block();
			_starter = new Starter();
			
			
			_isWorking = false;
			
		}
		
		public function startEngine():void {
			_isWorking = true;
			
		}
		
		public function stopEngine():void {
			_isWorking = false;
		}
		
		public function getRPM():int {
			return _rev;
		}
		
		public function get type():int { return _type; }
		
		public function set type(value:int):void 
		{
			_type = value;
		}
		
		public function get battery():Battery { return _battery; }
		
		public function set battery(value:Battery):void 
		{
			_battery = value;
		}
		
		public function get fuelTank():FuelTank { return _fuelTank; }
		
		public function set fuelTank(value:FuelTank):void 
		{
			_fuelTank = value;
		}
		
		public function get fuelPump():FuelPump { return _fuelPump; }
		
		public function set fuelPump(value:FuelPump):void 
		{
			_fuelPump = value;
		}
		
	}
	
}